package io.github.wslxm.springbootplus2.core.base.desensitization.handler;


import cn.hutool.core.util.DesensitizedUtil;
import io.github.wslxm.springbootplus2.core.base.desensitization.DesensitizationHandler;

/**
 * 【地址】只显示到地区，不显示详细地址，比如：北京市海淀区****
 *
 * @author wangsong
 * @date 2023/09/05
 */
public class AddressDesensitizationHandler implements DesensitizationHandler {

    @Override
    public String handler(String str) {
        // 只显示到地区，不显示详细地址，比如：北京市海淀区****
        return DesensitizedUtil.address(str,3);
    }
}
